package com.bobi.tfca.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.bobi.tfca.model.entity.MenuEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * 菜单持久层
 * @author 李文发
 * @date 2024/4/3
 */
@Mapper
public interface MenuDao extends BaseMapper<MenuEntity> {

    @Select("SELECT menu.menu_element_id FROM menu, menu_role WHERE menu_role.role_id = #{roleId} AND menu_role.menu_id = menu.menu_id")
    List<String> listRolePageMenu(Integer roleId);
}
